<template>
  <div class="swiper mySwiper">
    <div class="swiper-wrapper">
      <slot></slot>
    </div>
    <div class="swiper-pagination"></div>
  </div>
</template>

<style scoped>
.swiper {
  width: 100%;
  height: 100%;
}
</style>

<script>
// 引入库
import Swiper from 'swiper/bundle'
// 引入样式库这个是英文官网复制的 可以去看看在get start  中找到的
import 'swiper/css/bundle'
// 还是不能解决 网上找到

// Swiper.use([Autoplay, FreeMode]);
export default {
  mounted () {
    new Swiper('.mySwiper', {
      spaceBetween: 30,
      effect: 'fade',
      autoplay: {
        disableOnInteraction: false
      },
      pagination: {
        el: '.swiper-pagination',
        clickable: true
      }
    })
  }
}
</script>
